#ifndef __BE_RENDER__
#define __BE_RENDER__

class Render
{
 public:
  enum
  {
    OSMESA,
    GLES1,
    GLES2,
  };

 protected:
  int width, height;
  Render();

 public:
  virtual ~Render();

  static RenderPtr CreateRender( int _render );

  virtual bool init( int _width, int _height ) = 0;
  virtual void setCamera(const Turple3f &_eye, const Turple3f &_center, const Turple3f &_up) = 0;
  virtual void clear() = 0;
  virtual void draw(const  Mesh2Ptr _mesh) = 0;
  virtual void draw(const GLMeshPtr _mesh) = 0;
  virtual void begin() = 0;
  virtual void end() = 0;
  virtual void setMatrix(Turple3f &_loc, Turple2f &_ori) = 0;
  virtual void pushMatrix() = 0;
  virtual void popMatrix() = 0;
  virtual void writePPM(const char *_filename) = 0;
};

#endif
